*,
*:after,
*:before {
    box-sizing: border-box;
}

/* ===== ROOT VARIABLES ===== */
:root {
    /* Warna background */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f5f5f5;
    --color-bg-tertiary: #eeeeee;

    /* Warna teks */
    --color-text-primary: #111111;
    --color-text-secondary: #555555;
    --color-text-muted: #bdbdbd;

    /* Brand */
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-light: #dbeafe;

    --glow:hsla(319, 90%, 35%, 0.15);

    /* Semantik */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-border: rgba(0, 0, 0, 0.12);

    /* Tipografi */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Georgia', serif;
    --font-mono: 'Fira Code', monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --font-normal: 400;
    --font-medium: 500;
    --font-bold: 700;
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-loose: 1.75;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, .12);

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;

    /* Animasi */
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-base: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s;
}

body {
    margin: 0;
    padding: 0;
}

/* Wadah untuk kanvas p5.js */
#canvas-container {
    position: fixed;
    /* Membuatnya tetap di posisi yang sama bahkan saat scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Menempatkan kanvas di belakang semua elemen lain */
}

canvas {
    display: block;
    /* Menghilangkan spasi ekstra di bawah kanvas */
}

/* Styling untuk konten di atas kanvas */
main {
    position: relative;
    /* Diubah dari absolute agar flow dokumen lebih standar */
    z-index: 1;
    /* Memastikan konten ini di atas kanvas */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Mengisi tinggi viewport */
    color: white;
    font-family: 'Inter', sans-serif;
    text-align: center;
    flex-direction: column;
    gap: 1rem;
    margin: 4px;
}

h1 {
    font-size: clamp(4rem, 1rem + 5vw, 6rem);
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

p {
    font-size: clamp(1rem, 4vw, 1.2rem);
    margin: 0;
}

h2 {
    margin: 0px 0px 8px 0px;
}

.tab-button {
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    font-size: 16px;
    justify-content: center;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* sama rata */
    gap: var(--space-4);
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .tabs {
        grid-template-columns: 1fr;
    }
}


.tabs-content {
    display: none;
    height: 100%;
    max-height: inherit;
    /* ikut max-height container */
    overflow-y: auto;
    scrollbar-width: thin;
     overflow: visible
}

.tabs-content.active {
    display: block;
}


.tabs-content::-webkit-scrollbar {
    width: 4px;
}

.tabs-content::-webkit-scrollbar-track {
    background: transparent;
}

.tab-button.active {
    --bg:
        radial-gradient(40% 50% at center 100%,
            hsl(270 calc(var(--active) * 97%) 72% / var(--active)),
            transparent),
        radial-gradient(80% 100% at center 120%,
            hsl(260 calc(var(--active) * 97%) 70% / var(--active)),
            transparent),
        hsl(316 calc(var(--active) * 93%) calc((var(--active) * 23%) + 12%)/ var(--active));
    background: var(--bg);
    border: 0;
    box-shadow: 0 0 32px 16px hsla(319, 90%, 35%, 0.75);
    backdrop-filter: blur(2px) saturate(120%);
}

.container-tabs {
    max-width: 800px;
    max-height: 75vh;
    width: 100%;
}

.frosted-glass {
    width: 100%;
    padding: 24px;
    color: #fff;

    backdrop-filter: blur(2px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);

    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    overflow: hidden;
}

button.tab-button {
    --cut: 0.1em;
    --active: 0;
    --activeState: 0.5px;
    --bg:
        radial-gradient(40% 50% at center 100%,
            hsl(270 calc(var(--active) * 97%) 72% / var(--active)),
            transparent),
        radial-gradient(80% 100% at center 120%,
            hsl(260 calc(var(--active) * 97%) 70% / var(--active)),
            transparent),
        hsl(316 calc(var(--active) * 93%) calc((var(--active) * 23%) + 12%)/ var(--active));
    background: var(--bg);
    border: solid;
    border-width: var(--activeState);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25em;
    white-space: nowrap;
    border-radius: 100px;
    position: relative;
    box-shadow:
        0 0 calc(var(--active) * 6em) calc(var(--active) * 3em) hsla(319, 90%, 35%, 0.75);
    transition: box-shadow var(--transition), scale var(--transition), background var(--transition);
    scale: calc(1 + (var(--active) * 0.1));
}

button:active {
    scale: 1;
}

button:is(:hover, :focus-visible) path {
    animation-name: bounce;
}

@keyframes bounce {

    35%,
    65% {
        scale: var(--scale);
    }
}

button:is(:hover, :focus-visible) {
    --active: 1;
    --activeState: 0px;
    --play-state: runnin;
}

.bodydrop {
    background: hsl(260 97 6%);
    border-radius: 100px;
    position: fixed;
    inset: 0;
    z-index: -1
}

button:is(:hover, :focus-visible) {
    --active: 1;
    --play-state: running;
}


@keyframes float-out {
    to {
        rotate: 360deg;
    }
}

.text {
    translate: 2% -6%;
    background: hsl(0 0% calc((var(--active) * 100%) + 65%));
    -webkit-background-clip: text;
    color: transparent;
    transition: background var(--transition);
}

button svg {
    inline-size: 1.25em;
    translate: -25% -5%;
}

#expe .point {
    margin: 0;
    position: relative;
    z-index: 5;
}

.exp-contrainer {
    display: flex;
    justify-content: center;
    /* Membuat card berada di tengah halaman */
    gap: 16px;
    margin-top: 0;
    /* Kita atur jarak lewat card-item saja */
    position: relative;
}

.exp-contrainer .circel {
    height: 10px;
    width: 10px;
    border-radius: 10px;
    background: #fff;
}

#expe .retangle {
    height: 1px;
    width: 100%;
    background: #fff;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

/* untuk conten card */
.card-exp .card-body {
    display: none;
}

.card-exp.active .card-body {
    display: block;
    margin-top: var(--space-4);
    text-align: justify;

    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

.arrow {
    --rotate: 0deg;
    max-width: 24px;
    padding: 8px 0 8px 0;
    transform: rotate(var(--rotate))
}

.card-header.active .arrow {
    --rotate: 180deg;
}

.card-header {
    display: grid;
    gap: 8px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.job {
    font-weight: var(--font-bold);
    font-size: var(--text-lg);
}

.comp {
    font-size: var(--text-sm);
}

.nav-arrow {
    border: none;
    color: #d946ef;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Keep the inner icon background transparent */
.nav-arrow svg,
.nav-arrow i {
    background: transparent !important;
}

.card-exp:not(.active) .prev-arrow,
.card-exp:not(.active) .next-arrow {
    display: none;
}

.card-exp.active.is-last .next-arrow {
    visibility: hidden;
}

.card-exp.active.is-first .prev-arrow {
    visibility: hidden;
}

.nav-arrow svg {
    width: 18px;
    height: 18px;
}


.card-item {
    position: relative;
    width: 100%;
    margin-top: 12px;
}

.card-exp.active {
    display: grid;
    gap: 16px;
    grid-auto-flow: column;
}

.card-item .circle {
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: -18px;

    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.card-exp.frosted-glass {
    padding: 12px 24px 12px 24px;
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
}

.card-exp.active .card-content {
    display: block;
    align-items: stretch;
    height: 100%;
}

.card-content {
    display: flex;
    align-items: stretch;
    height: 100%;
    justify-content: center;
}

.title {
    margin-bottom: 16px;
}

.date {
    margin-bottom: 8px;
}

.tech-text {
    display: inline;
    font-size: var(--text-xs);

}

.tech-stack {
    color: #93c5fd;
}

.tech-stack {
    border: none;
}

.tech-badges {
    display: none;
}

.card-exp.active .tech-text {
    display: none;
}

.card-exp.active .tech-badges {
    display: inline;
}

.card-exp.active .job {
    font-size: var(--text-2xl);
}

.tech-badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    color: #93c5fd;
    margin-right: 4px;
}

.card-footer {
    display: none;
}

.card-exp.active .card-footer {
    display: block;
    margin: var(--space-4);
}

.glow-effect {
    background-color: hsla(319, 90%, 35%, 0);
    scale: 1;
    box-shadow:
        0 0 0 0 hsla(319, 90%, 35%, 0),
        inset 0 0 0 0 hsla(319, 90%, 35%, 0);

    transition: box-shadow 0.3s ease, background-color 0.3s ease, scale 0.3s ease;
}

.glow-effect:hover {
    scale: 1.1;
    background-color: hsla(319, 90%, 35%, 0.15);

    box-shadow:
        0 0 6em 3em hsla(319, 90%, 35%, 0.75),
        inset 0 0 1.5em 0.5em hsla(319, 90%, 35%, 0.6);
}

.glow-effect:active {
    scale: 0.95;
    box-shadow:
        0 0 6px 1px hsla(319, 90%, 35%, 0.4),
        inset 0 0 10px 3px hsla(319, 90%, 35%, 0.3);
}

.card-footer button {
    background: transparent;
    border: solid;
    padding: 12px;
    border-width: 0.5px;
    border-radius: 99px;
    color: #fff;
    white-space: nowrap;
}

.muted-text {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.desc-perusahaan ul {
    padding-left: 1.2rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.desc-perusahaan li {
    line-height: 1.6;
}

.play-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: var(--space-4);
    grid-auto-flow: dense; /* ← ini kuncinya */
}

.proj-card .proj-thumb {
    height: 65px;
    font-size: var(--text-2xl);
}

.proj-card.frosted-glass{
    padding: 0;
}

.proj-card {
    border: 1px solid hsla(var(--glow), 0.3);
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.proj-card:hover {
    scale: 1.1;
    transition: box-shadow 0.3s ease, background-color 0.3s ease, scale 0.3s ease;
    border-color: hsla(var(--glow), 0.8); 
     box-shadow:
        0 0 2em 0.5em hsla(var(--glow));
}


.proj-info{
    padding: 8px;
    border-radius: 0px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: start;
}

.proj-info .proj-type-tag {
    font-size: 9px;
    color: rgba(160, 90, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 3px;
  }

  .proj-info .proj-name {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 3px;
  }

.proj-info .proj-stack {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
  }

.proj-thumb {
    width: 100%;
    height: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
     transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                font-size 0.4s ease;
}


   /* === EXPANDED STATE === */
.expanded-inner {
    height: 0;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 14px;
}

.proj-card.expanded .expanded-inner {
    padding: 0 14px 14px;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

  .proj-card.expanded .proj-thumb {
    height: 160px;
    font-size: 40px;
}

  .proj-card.expanded .proj-name {
    font-size: 15px;
  }

  .proj-card.expanded .proj-stack {
    font-size: 10px;
  }

.proj-card.expanded {
    grid-column: span 2;
    grid-row: span 2;
    border-color: hsla(var(--glow), 0.6);
    background: hsla(var(--glow), 0.08);
}

  .proj-card.expanded:hover {
    scale: 1;
  }

  .exp-divider {
    height: 0.5px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 0;
  }

  .exp-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .exp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
  }

  .exp-col-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 5px;
  }
/* 
  .tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .tech-badge {
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.55);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
  } */

  .highlights {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .highlights li {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    padding: 2px 0;
    display: flex;
    gap: 6px;
  }

  .highlights li::before {
    content: "→";
    color: rgba(160, 90, 255, 0.7);
    flex-shrink: 0;
  }

  .exp-links {
    display: flex;
    gap: 8px;
  }

  .exp-link {
    font-size: 10px;
    padding: 5px 12px;
    border-radius: 99px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .exp-link.primary {
    background: rgba(160, 90, 255, 0.2);
    border-color: rgba(160, 90, 255, 0.5);
    color: #fff;
  }

  .close-hint {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.2);
    text-align: right;
    margin-top: 8px;
  }

.exp-content-wrapper {
  opacity: 0;
  transform: translateY(-10px);
}

.proj-card.expanded .exp-content-wrapper {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.35s ease;
  transition-delay: 0.1s; /* Konten muncul sedikit setelah kotak membesar */
}

.proj-card:not(.expanded) .expanded-inner,
.proj-card:not(.expanded) .exp-content-wrapper {
  transition: none !important;
}


  .filter-bar {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }

  .filter-pill {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 99px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
  }

  .filter-pill.active {
    background: rgba(160, 90, 255, 0.25);
    border-color: rgba(160, 90, 255, 0.55);
    color: #fff;
  }

  .filter-pill:hover:not(.active) {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.75);
  }